/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 * <p>
 * https://www.renren.io
 * <p>
 * 版权所有，侵权必究！
 */

package com.ll.xiaonew.system.modules.sys.controller;

import com.ll.xiaonew.system.common.utils.PageUtils;
import com.ll.xiaonew.system.common.utils.R;
import com.ll.xiaonew.system.modules.sys.entity.SysLogEntity;
import com.ll.xiaonew.system.modules.sys.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Map;


/**
 * 系统日志
 *
 * @author Mark sunlightcs@gmail.com
 */
@Controller
@RequestMapping("/sys/log")
public class SysLogController {
    @Autowired
    private SysLogService sysLogService;

    /**
     * 列表
     */
    @ResponseBody
    @GetMapping("/list")
//    @RequiresPermissions("sys:log:list")
    public R list(@RequestParam Map<String, Object> params) {
        PageUtils page = sysLogService.queryPage(params);

        return R.ok().put("page", page);
    }

    @PostMapping("/save")
    @ResponseBody
    public void save(@RequestBody SysLogEntity sysLogEntity) {
        sysLogService.save(sysLogEntity);
    }
}
